package cc.yugu.yhdw.webserver.persistence.basic;

import cc.yugu.yhdw.common.domain.basic.WeixinPayOrder;
import cc.yugu.yhdw.common.persistence.MasterMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 微信支付订单信息
 *
 * @Date:Created in 2018/6/29 14:05
 * @Author:
 * @Modified By: zjn 2018/6/29 14:05
 */
public interface WeixinPayOrderMapper extends MasterMapper {
    /**
    * 通过左外连接 根据表bas_weixin_pay_order 中的支付人、来源类型、来源id、订单状态等字段来查询表bas_weixin_pay_order和bas_customer中指定字段数据
    *
    * @Param: [customerId, sourceType, sourceId, orderStatus]
    * @Return: cc.yugu.yhdw.common.domain.basic.WeixinPayOrder
    * @Author By: zjn 2018/6/29  14:07
    */
    public WeixinPayOrder find(@Param("customerId") Integer customerId, @Param("sourceType") Integer sourceType, @Param("sourceId") String sourceId, @Param("orderStatus") Integer orderStatus);
    /**
    * 通过左外连接查询上述两张表，并返回对应 行数
    *
    * @Param: [search]
    * @Return: int
    * @Author By: zjn 2018/6/29  14:13
    */
    public int findPageCount(WeixinPayOrder search);
    /**
    * 左外连接按条件分页查询，并将查询结果按照 bas_weixin_pay_order表中的主键id降序排列
    *
    * @Param: [search]
    * @Return: java.util.List<cc.yugu.yhdw.common.domain.basic.WeixinPayOrder>
    * @Author By: zjn 2018/6/29  14:14
    */
    public List<WeixinPayOrder> findPageResult(WeixinPayOrder search);

}
